fn main() {
    var make_atm = fn():fn(int):int {
        var cash = 1000
        return fn(int amount):int {
            cash -= amount
            return cash
        }
    }

    var atm1_draw = make_atm()
    var atm2_draw = make_atm()

    println(atm1_draw(100))
    println(atm1_draw(100))
    println(atm2_draw(100))
    println(atm2_draw(100))
}